<?php echo $header; ?>
<div id="page">
  <div id="content-top"><?php echo $content_top; ?></div>
  <?php echo $column_left; ?><?php echo $column_right; ?>
  <div id="content">
  <div class="home-box-heading">Sản phẩm nổi bật</div>
  <hr class="border-c" style="margin-bottom:20px;"/>
  <?php if ($products) {
    $i = 1;
  ?>
    <div class="home-product-list">
      <?php foreach ($products as $product) { ?>
      <?php if($i % 3 == 1):?><div class="product-list-row"><?php endif;?>
        <div class="product-item">
          <?php if ($product['thumb']) { ?>
          <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
          <?php } ?>
          <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
          <?php if ($product['price']) { ?>
          <div class="price">
            <?php if (!$product['special']) { ?>
            <?php echo $product['price']; ?>
            <span class="cart"><a class="button_buy" onclick="addToCart('<?php echo $product['product_id']; ?>');"><span>Mua hàng</span></a></span>
            <?php } else { ?>
            <span class="price-new"><?php echo $product['special']; ?></span>
            <span class="cart"><a class="button_buy" onclick="addToCart('<?php echo $product['product_id']; ?>');"><span>Mua hàng</span></a></span>
            <?php } ?>
          </div>
          <?php } else { ?>
          <span class="cart"><a class="button_buy" onclick="addToCart('<?php echo $product['product_id']; ?>');"><span>Mua hàng</span></a></span>
          <?php } ?>
          <!--&nbsp;<a class="button" href="<?php echo $product['href']; ?>"><span>Chi tiết</span></a>-->
        </div>
      <?php if($i % 3 == 0):?></div><?php endif;?>
      <?php
        $i++;
      } ?>
      <?php if($i % 3 != 1):?></div><?php endif;?>
    </div>
    <?php } ?>
  </div>
  <div id="content-bottom">
    <?php echo $content_bottom; ?>
  </div>
</div>
<?php echo $footer; ?>